﻿//===============================================================================
// La Pomme d'Or Krystal Application
// Windows Presentation Foundation Composite Application 
//===============================================================================
// Copyright (c) Jérôme Piquot.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System;
using System.Collections.Generic;

namespace PJ.Data
{
    /// <summary>
    /// Entity fragments data provider interface
    /// </summary>
    public interface IEntityFragmentProvider 
    {
        /// <summary>
        /// Finds a <see cref="IEntityData">owner</see> fragment list
        /// </summary>
        /// <param name="ownerId"><see cref="IEntityData">owner</see> id</param>
        /// <param name="mode">Fetch mode</param>
        /// <returns>List of fragments global ids or <see langword="null" /> if no fragments found</returns>
        /// <exception cref="ArgumentNullException">When <paramref name="ownerId"/> is <see langword="null" /> or empty.</exception>
        string[] GetFragments(string ownerId, GetDataMode mode);

    }
    /// <summary>
    /// Entity fragments data provider interface
    /// </summary>
    /// <typeparam name="T"><see cref="IEntityFragmentData"/> type</typeparam>
    public interface IEntityFragmentProvider<T> : IEntityFragmentProvider
        where T : class, IEntityFragmentData
    {
    }
}
